.todo-container {
  min-height: 100vh;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 0;
}

.header {
  padding: 120rpx 40rpx 40rpx;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-direction: row;
}

.header .header-left .title {
  display: block;
  font-size: 48rpx;
  font-weight: 700;
  color: white;
  margin-bottom: 8rpx;
}

.header .header-left .subtitle {
  font-size: 28rpx;
  color: rgba(255, 255, 255, 0.8);
}

.header .add-btn {
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  border: 2rpx solid rgba(255, 255, 255, 0.3);
  border-radius: 50rpx;
  padding: 16rpx 32rpx;
  display: flex;
  align-items: center;
  color: white;
  font-size: 28rpx;
}

.add-btn .add-icon {
  margin-right: 8rpx;
  font-weight: bold;
}

.stats-card {
  background: white;
  margin: 0 40rpx 30rpx;
  border-radius: 24rpx;
  padding: 40rpx;
  display: flex;
  justify-content: space-around;
  align-items: center;
  box-shadow: 0 10rpx 30rpx rgba(0, 0, 0, 0.1);
  flex-direction: row;
}

.stats-card .stats-item {
  text-align: center;
  flex: 1;
}

.stats-item .stats-number {
  display: block;
  font-size: 36rpx;
  font-weight: 700;
  color: #333;
  margin-bottom: 8rpx;
}

.stats-item .stats-label {
  font-size: 24rpx;
  color: #666;
}

.stats-card .stats-divider {
  width: 1rpx;
  height: 40rpx;
  background: #eee;
}

.date-filter {
  padding: 0 40rpx 30rpx;
}

.date-filter .date-scroll {
  white-space: nowrap;
  width: 100%;
  display: flex;
  flex-direction: row;
}

.date-scroll .date-tab {
  display: inline-flex;
  padding: 16rpx 32rpx;
  margin-right: 20rpx;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50rpx;
  border: 2rpx solid rgba(255, 255, 255, 0.3);
  flex: 0 0 auto;
}

.date-tab.active {
  background: white;
  border-color: white;
}

.date-tab.active .date-label {
  color: #667eea;
  font-weight: 600;
}

.date-tab .date-label {
  font-size: 28rpx;
  color: white;
}

.todo-list {
  padding: 0 40rpx 40rpx;
  min-height: 60vh;
}

.todo-list .todo-card {
  background: white;
  border-radius: 20rpx;
  padding: 30rpx;
  margin-bottom: 24rpx;
  display: flex;
  align-items: flex-start;
  box-shadow: 0 8rpx 24rpx rgba(0, 0, 0, 0.06);
  border-left: 8rpx solid #e8e8e8;
  flex-direction: row; /* 显式设置横向排列 */
}

.todo-card.priority-high {
  border-left-color: #ff4757;
}

.todo-card.priority-medium {
  border-left-color: #ffa502;
}

.todo-card.completed {
  opacity: 0.7;
}

.todo-card.completed .todo-title {
  text-decoration: line-through;
  color: #999;
}

.todo-card .todo-checkbox {
  margin-right: 24rpx;
  padding-top: 4rpx;
}

.todo-checkbox .checkbox {
  width: 40rpx;
  height: 40rpx;
  border: 3rpx solid #ddd;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.checkbox.checked {
  background: #2ed573;
  border-color: #2ed573;
}

.checkbox.checked .checkmark {
  color: white;
  font-size: 24rpx;
  font-weight: bold;
}

.todo-card .todo-content {
  flex: 1;
}

.todo-content .todo-header {
  display: flex;
  justify-content: between;
  align-items: flex-start;
  margin-bottom: 16rpx;
}

.todo-header .todo-title {
  flex: 1;
  font-size: 32rpx;
  font-weight: 600;
  color: #333;
  line-height: 1.4;
}

.todo-header .todo-badges {
  margin-left: 16rpx;
  flex-direction: row; /* 改为横向排列 */
  gap: 4rpx; /* 设置标签之间的间距 */
  flex-wrap: wrap; /* 允许换行 */
  align-items: center; /* 垂直居中对齐 */
}

.todo-badges .priority-badge,
.todo-badges .date-badge {
  padding: 4rpx 12rpx;
  border-radius: 6rpx;
  font-size: 20rpx;
  margin-left: 8rpx;
}

.todo-badges .priority-badge.high {
  background: #ff4757;
  color: white;
}

.todo-badges .priority-badge.medium {
  background: #ffa502;
  color: white;
}

.todo-badges .date-badge.today {
  background: #2ed573;
  color: white;
}

.todo-badges .date-badge.overdue {
  background: #ff4757;
  color: white;
}

.todo-content .todo-desc {
  display: block;
  font-size: 28rpx;
  color: #666;
  line-height: 1.5;
  margin-bottom: 16rpx;
}

.todo-content .todo-meta .todo-date,
.todo-content .todo-meta .completed-time {
  font-size: 24rpx;
  color: #999;
  margin-right: 20rpx;
}

.todo-meta .todo-date .date-icon {
  margin-right: 8rpx;
}

.todo-card .todo-actions {
  display: flex;
  flex-direction: column;
  margin-left: 20rpx;
  justify-content: center;
  align-items: center;
}

.todo-actions .action-btn {
  background: none;
  border: none;
  padding: 12rpx;
  margin-bottom: 8rpx;
  border-radius: 8rpx;
  display: flex;
  justify-content: center;
  align-items: center;
}

.action-btn.edit {
  background: #f1f2f6;
}

.action-btn.copy {
  background: #e3f2fd;
}

.action-btn.delete {
  background: #fff1f0;
}

.action-btn .action-icon {
  font-size: 28rpx;
}

.empty-state {
  text-align: center;
  padding: 120rpx 0;
}

.empty-state .empty-image {
  width: 200rpx;
  height: 200rpx;
  margin-bottom: 40rpx;
  opacity: 0.5;
}

.empty-state .empty-text {
  display: block;
  font-size: 32rpx;
  color: #999;
  margin-bottom: 16rpx;
}

.empty-state .empty-subtext {
  font-size: 28rpx;
  color: #ccc;
}

.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal .modal-content {
  background: white;
  width: 85%;
  max-height: 80vh;
  border-radius: 24rpx;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.modal-content .modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 40rpx;
  border-bottom: 1rpx solid #f1f2f6;
}

.modal-header .modal-title {
  font-size: 36rpx;
  font-weight: 600;
  color: #333;
}

.modal-header .close-btn {
  background: none;
  border: none;
  font-size: 36rpx;
  color: #999;
  padding: 0;
  width: 60rpx;
  height: 60rpx;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content .modal-body {
  flex: 1;
  padding: 40rpx;
  overflow-y: auto;
}

.modal-body .form-group {
  margin-bottom: 40rpx;
}

.form-group .form-label {
  display: block;
  font-size: 28rpx;
  font-weight: 600;
  color: #333;
  margin-bottom: 16rpx;
}

.form-group .form-input,
.form-group .form-textarea {
  width: 100%;
  padding: 24rpx;
  border: 2rpx solid #f1f2f6;
  border-radius: 12rpx;
  font-size: 28rpx;
  background: #fafbfc;
}

.form-input:focus,
.form-textarea:focus {
  border-color: #667eea;
  background: white;
}

.form-group .form-textarea {
  height: 160rpx;
}

.form-group .char-count {
  display: block;
  text-align: right;
  font-size: 24rpx;
  color: #999;
  margin-top: 8rpx;
}

.modal-body .form-row {
  display: flex;
  gap: 30rpx;
  flex-direction: column; /* 改为纵向排列 */
}

.form-row .form-group {
  flex: 1;
}

.form-row .date-picker .picker-display,
.form-row .priority-picker .picker-display {
  padding: 24rpx;
  border: 2rpx solid #f1f2f6;
  border-radius: 12rpx;
  background: #fafbfc;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.picker-display .picker-text {
  font-size: 28rpx;
  color: #333;
}

.picker-display .picker-icon {
  font-size: 28rpx;
}

.modal-content .modal-footer {
  display: flex;
  padding: 30rpx 40rpx;
  border-top: 1rpx solid #f1f2f6;
  gap: 20rpx;
  flex-direction: row; /* 显式设置横向排列 */
}

.modal-footer .btn {
  flex: 1;
  padding: 24rpx;
  border: none;
  border-radius: 12rpx;
  font-size: 28rpx;
  font-weight: 600;
}

.picker-view {
  width: 750rpx;
  height: 600rpx;
  margin-top: 20rpx;
}
.item {
  line-height: 100rpx;
  text-align: center;
}

.btn.btn-cancel {
  background: #f1f2f6;
  color: #666;
}

.btn.btn-confirm {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
}
/* uni-popup 内容样式 */
.popup-content {
  background: white;
  border-radius: 16rpx;
  width: 90%;
  max-width: 750rpx;
  margin: 0 auto;
  padding: 0;
  box-sizing: border-box;
}

.popup-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 30rpx;
  border-bottom: 2rpx solid #f0f0f0;
}

.popup-title {
  font-size: 32rpx;
  font-weight: bold;
  color: #333;
}

.close-btn {
  background: none;
  border: none;
  font-size: 36rpx;
  color: #999;
  padding: 0;
  width: 60rpx;
  height: 60rpx;
  display: flex;
  align-items: center;
  justify-content: center;
}

.popup-body {
  padding: 30rpx;
  max-height: 60vh;
  overflow-y: auto;
}

.popup-footer {
  display: flex;
  justify-content: center; /* 水平居中 */
  align-items: center;     /* 垂直居中 */
  gap: 20rpx;
  padding: 30rpx;
  flex-direction: row;
  border-top: 2rpx solid #f0f0f0;
}

.btn {
  padding: 15rpx 30rpx;
  border-radius: 8rpx;
  font-size: 26rpx;
  border: none;
  min-width: 120rpx;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  white-space: nowrap; /* 防止文字换行 */
}

.btn-cancel {
  background: #f0f0f0;
  color: #666;
}

.btn-confirm {
  background: #007AFF;
  color: white;
}

/* 表单样式 */
.form-group {
  margin-bottom: 30rpx;
}

.form-label {
  display: block;
  font-size: 28rpx;
  color: #333;
  margin-bottom: 16rpx;
  font-weight: 500;
}

.form-row {
  display: flex;
  gap: 20rpx;
  flex-direction: row;
  justify-content: center; /* 水平居中 */
  align-items: center;     /* 垂直居中 */
}

.form-row .form-group {
  flex: 1;
}

.uni-input, .form-textarea {
  border: 2rpx solid #e0e0e0;
  border-radius: 12rpx;
  padding: 20rpx 24rpx;
  font-size: 28rpx;
  background: #fafafa;
  width: 100%;
  box-sizing: border-box;
}

.form-textarea {
  min-height: 120rpx;
}

.char-count {
  display: block;
  text-align: right;
  font-size: 24rpx;
  color: #999;
  margin-top: 8rpx;
}

.picker-display {
  border: 2rpx solid #e0e0e0;
  border-radius: 12rpx;
  padding: 20rpx 24rpx;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fafafa;
  min-height: 80rpx;
}

.picker-text {
  font-size: 28rpx;
  color: #333;
}

.picker-icon {
  font-size: 28rpx;
}